function delayLog(str) {
    return new Promise((resolve, _) => {
        setTimeout(() => {
            console.log(str);
            resolve()
        }, 1000);
    })
}
async function time() {
    for (let i = 1; i <= 5; i++) {
        await delayLog(i)
    }
}
time();
